﻿<%@ Page Title="Đăng ký tài khoản" Language="C#" MasterPageFile="~/MasterPages/Users.Master" AutoEventWireup="true" CodeBehind="DangKyTaiKhoan.aspx.cs" Inherits="OnlineAuction.Guest.DangKyTaiKhoan" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="register">
        <table cellspacing="6" style="width: 100%;">
            <tr>
                <th colspan="4" style="text-align: center;">
                    <asp:Label ID="Label12" runat="server" Text="Thông tin đăng ký" 
                        Font-Size="20px" ForeColor="#6666FF"></asp:Label>
                </th>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label1" runat="server" Text="Tên đăng nhập(*): "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtTenDangNhap" runat="server" Height="25px" Width="200px"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtTenDangNhap" ErrorMessage="Tên đăng nhập: bắt buộc nhập">*</asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="CustomValidator1" runat="server" 
                        ControlToValidate="txtTenDangNhap" 
                        ErrorMessage="Tên đăng nhập: chỉ chấp nhận ký tự alphabet hoặc ký số và bắt đầu bằng ký tự" 
                        onservervalidate="CustomValidator1_ServerValidate">*</asp:CustomValidator>
                    <asp:CustomValidator ID="CustomValidator5" runat="server" 
                        ControlToValidate="txtTenDangNhap" 
                        ErrorMessage="Tên đăng nhập: tối thiểu 6 ký tự" 
                        onservervalidate="CustomValidator5_ServerValidate">*</asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    Kiểm tra tồn tại: </td>
                <td style="text-align: left; vertical-align: middle;" colspan="2">
                    <asp:ImageButton ID="ImageButton1" runat="server" 
                        AlternateText="" CausesValidation="False" Height="23px" 
                        ImageAlign="Middle" ImageUrl="~/TempImages/check.jpeg" Width="25px" onclick="ImageButton1_Click"/>
                    <asp:Label ID="lblCheckTenDangNhap" runat="server" Font-Italic="True" 
                        Font-Size="11px" ForeColor="#94AA54"></asp:Label>
                    </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label2" runat="server" Text="Mật khẩu(*): "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtMatKhau" runat="server" Height="25px" Width="200px" 
                        TextMode="Password" TabIndex="1"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="txtTenDangNhap" ErrorMessage="Mật khẩu: bắt buộc nhập">*</asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="CustomValidator2" runat="server" 
                        ControlToValidate="txtMatKhau" 
                        ErrorMessage="Mật khẩu: chỉ chấp nhận ký tự alphabet  hoặc ký số" 
                        onservervalidate="CustomValidator2_ServerValidate">*</asp:CustomValidator>
                    <asp:CustomValidator ID="CustomValidator6" runat="server" 
                        ControlToValidate="txtMatKhau" ErrorMessage="Mật khẩu: tối thiểu 5 ký tự" 
                        onservervalidate="CustomValidator6_ServerValidate">*</asp:CustomValidator>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                        ControlToCompare="txtNhapLaiMatKhau" ControlToValidate="txtMatKhau" 
                        ErrorMessage="Mật khẩu lặp lại phải trùng nhau">*</asp:CompareValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label3" runat="server" Text="Nhập lại mật khẩu: "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtNhapLaiMatKhau" runat="server" Height="25px" Width="199px" 
                        TextMode="Password" TabIndex="2"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label4" runat="server" Text="Họ tên(*): "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtHoTen" runat="server" Height="25px" Width="200px" 
                        MaxLength="40" TabIndex="3"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="txtHoTen" ErrorMessage="Họ tên: bắt buộc nhập">*</asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="CustomValidator4" runat="server" 
                        ControlToValidate="txtHoTen" ErrorMessage="Họ tên: bắt buộc ký tự alphabet" 
                        onservervalidate="CustomValidator4_ServerValidate">*</asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label5" runat="server" Text="Phone(*): "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtPhone" runat="server" Height="25px" Width="199px" 
                       TabIndex="4"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="txtPhone" ErrorMessage="Phone: bắt buộc nhập">*</asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="CustomValidator3" runat="server" 
                        ControlToValidate="txtPhone" ErrorMessage="Phone: chỉ cho phép số" 
                        onservervalidate="CustomValidator3_ServerValidate">*</asp:CustomValidator>
                    <asp:CustomValidator ID="CustomValidator7" runat="server" 
                        ControlToValidate="txtPhone" ErrorMessage="Phone: ít nhất 6 số" 
                        onservervalidate="CustomValidator7_ServerValidate">*</asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td colspan="4" style="text-align: left; height:auto;
                     font-size: 11px; font-style:italic; color: Green;">
                Chú ý: Xin hãy nhập đúng số phone của bạn. Mã kích hoạt 
                sẽ được gửi tới số máy này sau khi bạn đăng ký thành công.
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label7" runat="server" Text="Tel(*): "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtTel" runat="server" Height="25px" Width="200px" 
                        TabIndex="5"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="txtTel" ErrorMessage="Tel: bắt buộc nhập">*</asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="CustomValidator8" runat="server" 
                        ControlToValidate="txtTel" ErrorMessage="Tel: chỉ chấp nhận số" 
                        onservervalidate="CustomValidator8_ServerValidate">*</asp:CustomValidator>
                    <asp:CustomValidator ID="CustomValidator9" runat="server" 
                        ControlToValidate="txtTel" ErrorMessage="Tel: tối thiểu 6 số" 
                        onservervalidate="CustomValidator9_ServerValidate">*</asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label8" runat="server" Text="Địa chỉ(*): "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtDiaChi" runat="server" Height="25px" Width="200px" 
                        MaxLength="60" TabIndex="6"></asp:TextBox>
                    </td>
                <td>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="txtDiaChi" ErrorMessage="Địa chỉ: bắt buộc nhập">*</asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label9" runat="server" Text="Email: "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:TextBox ID="txtEmail" runat="server" Height="25px" Width="200px" 
                        TabIndex="7"></asp:TextBox>
                    </td>
                <td>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="txtEmail" 
                        ErrorMessage="Email: phải có dạng  name@company.domain" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label10" runat="server" Text="Ngày sinh: "></asp:Label>
                </td>
                <td style="height: 26px; width: 25px;">
                    <asp:TextBox ID="txtNgaySinh" runat="server" Height="25px" Width="200px" 
                        TabIndex="8"></asp:TextBox>
                </td>
                <td style="height: 26px">
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    <asp:Label ID="Label11" runat="server" Text="Giới tính: "></asp:Label>
                </td>
                <td style="width: 25px">
                    <asp:RadioButton ID="rdbNam" runat="server" Text="Nam" Checked="True" 
                        GroupName="rdbGioiTinh" TabIndex="9" />
                    <asp:RadioButton ID="rdbNu" runat="server" Text="Nữ" GroupName="rdbGioiTinh" 
                        TabIndex="10" />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: right">
                    &nbsp;</td>
                <td style="width: 25px">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td style="text-align: right">
                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                        PostBackUrl="~/Default.aspx" TabIndex="12">Về trang chủ</asp:LinkButton>
                </td>
                <td style="text-align: left; width: 25px;">
                     <asp:Button ID="btnDangKy" runat="server" Text="Đăng ký" Height="25px" 
                         Width="100px" TabIndex="11" onclick="btnDangKy_Click"/>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                    &nbsp;</td>
                <td colspan="2">
                    <asp:ValidationSummary ID="valsumary" runat="server" 
                        HeaderText="Thông tin không hợp lệ!" DisplayMode="List"/>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
